import React, {
	Component
} from 'react';
import {
	inject,
	observer,
} from 'mobx-react';
import {
	Tools,
} from 'weaver-mobile';
import Balance from "../myAttendance/my/Balance.js";
import '../../style/myAttendance.less';
const getLabel = Tools.getLabel;

@inject('myAttendanceStore')
@observer
export default class Main extends Component {
	constructor(props) {
		super(props);
	}

	componentDidMount() {
		this.props.history.push("/vacationBalance");
		this.props.myAttendanceStore.init();
	}

	componentWillMount() {
		const {
			changeTitle,
		} = this.props.myAttendanceStore;

		changeTitle(getLabel(513217,"假期余额"));
	}

	render() {
		const {
			myAttendanceStore
		} = this.props;

		return (
			<div style={{ position: 'fixed', height: '100%', width: '100%', top: 0 } } className="hrm-sign-attendance">
				<Balance store={myAttendanceStore} />
			</div>
			
		);
	}
}